import Mock from 'mockjs'
import homeApi from './home'
import userApi from './user'
import permissionApi from './permission'
// 为了模拟真实的请求数据 我们设置一个延时效果，设置200-2000毫秒的延时
Mock.setup({
  timeout: '200-2000',
})

// 首页相关  拦截路径 /home/getData
Mock.mock(/\/home\/getHomeData/, 'get', homeApi.getHomeData)

// 用户相关
Mock.mock(/\/user\/getUser/, 'get', userApi.getUserList)
Mock.mock(/\/user\/del/, 'get', userApi.deleteUser)
Mock.mock(/\/user\/batchremove/, 'get', userApi.batchremove)
Mock.mock(/\/user\/add/, 'post', userApi.createUser)
Mock.mock(/\/user\/edit/, 'post', userApi.updateUser)

Mock.mock(/\/permission\/getMenu/, 'post', permissionApi.getMenu)
